package com.mygame.db.entity;

import java.util.ArrayList;
import java.util.List;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import com.mygame.db.entity.model.PlayerBasic;

@Document(collection = "UserAccount")
public class UserAccount {
    @Indexed
    private String userName;
    private String password;
    @Id
    private long userId;
    private long createTime;
    private String registIp;
    // 登陆类型：1 用户名密码；2 第三方sdk
    private int registerType;
    private String lastLoginIp;
    // 记录已创建角色的基本信息
    private List<PlayerBasic> players = new ArrayList<>();

    public int getRegisterType() {
        return registerType;
    }

    public void setRegisterType(int registerType) {
        this.registerType = registerType;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public String getRegistIp() {
        return registIp;
    }

    public void setRegistIp(String registIp) {
        this.registIp = registIp;
    }

    public String getLastLoginIp() {
        return lastLoginIp;
    }

    public void setLastLoginIp(String lastLoginIp) {
        this.lastLoginIp = lastLoginIp;
    }

    public List<PlayerBasic> getPlayers() {
        return players;
    }

    public void setPlayers(List<PlayerBasic> players) {
        this.players = players;
    }

   

}
